package com.bosssoft.trainee.entity.vo;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * @author liuqiang
 * @date 2022/7/4 19:20
 */
@Data
public class RoleVO {

    private Integer roleId;

    @NotBlank(message = "角色编号不能为空")
    @Size(min = 2, max = 6, message = "角色编号不少于2位不长于6位")
    @Pattern(regexp = "^[a-zA-Z0-9]+$", message = "不能包含特殊字符")
    private String roleCode;

    @NotBlank(message = "角色名不能为空")
    @Size(min = 2, max = 10, message = "角色名称不少于2位不长于10位")
    private String roleName;
}
